package org.springrain.selenium.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.springrain.frame.annotation.WhereSQL;
import org.springrain.frame.entity.BaseEntity;
/**
 * TODO 在此加入类描述
 * @copyright {@link weicms.net}
 * @author springrain<Auto generate>
 * @version  2018-06-02 21:54:43
 * @see org.springrain.selenium.entity.Htmlcaseexec
 */
@Table(name="tc_htmlcaseexec")
public class Htmlcaseexec  extends BaseEntity {
	
	private static final long serialVersionUID = 1L;

	//alias
	/*
	public static final String TABLE_ALIAS = "Htmlcaseexec";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_BUSINESSID = "入口用例Id";
	public static final String ALIAS_BUSINESSNAME = "入口用例名称";
	public static final String ALIAS_CASECOUNT = "用例数";
	public static final String ALIAS_OPERATIONCOUNT = "步骤数";
	public static final String ALIAS_FAILCOUNT = "失败的测试用例个数";
	public static final String ALIAS_SUCCESSCOUNT = "成功的测试用例个数";
	public static final String ALIAS_USERID = "执行人";
	public static final String ALIAS_STARTDATE = "开始时间";
	public static final String ALIAS_ENDDATE = "结束时间";
	public static final String ALIAS_BAK1 = "bak1";
	public static final String ALIAS_BAK2 = "bak2";
	public static final String ALIAS_BAK3 = "bak3";
	public static final String ALIAS_BAK4 = "bak4";
	public static final String ALIAS_BAK5 = "bak5";
    */
	//date formats
	//public static final String FORMAT_STARTDATE = DateUtils.DATETIME_FORMAT;
	//public static final String FORMAT_ENDDATE = DateUtils.DATETIME_FORMAT;
	
	//columns START
	/**
	 * id
	 */
	private java.lang.String id;
	/**
	 * 入口用例Id
	 */
	private java.lang.String businessId;
	/**
	 * 入口用例名称
	 */
	private java.lang.String businessName;
	/**
	 * 用例数
	 */
	private java.lang.Integer caseCount;
	/**
	 * 步骤数
	 */
	private java.lang.Integer operationCount;
	/**
	 * 失败的测试用例个数
	 */
	private java.lang.Integer failCount;
	/**
	 * 成功的测试用例个数
	 */
	private java.lang.Integer successCount;
	/**
	 * 执行人
	 */
	private java.lang.String userId;
	/**
	 * 开始时间
	 */
	private java.util.Date startDate;
	/**
	 * 结束时间
	 */
	private java.util.Date endDate;
	/**
	 * bak1
	 */
	private java.lang.String bak1;
	/**
	 * bak2
	 */
	private java.lang.String bak2;
	/**
	 * bak3
	 */
	private java.lang.String bak3;
	/**
	 * bak4
	 */
	private java.lang.String bak4;
	/**
	 * bak5
	 */
	private java.lang.String bak5;
	//columns END 数据库字段结束
	
	
	private List<Htmlparameter> parameters=new ArrayList<>();
	
	//concstructor

	public Htmlcaseexec(){
	}

	public Htmlcaseexec(
		java.lang.String id
	){
		this.id = id;
	}

	//get and set
		/**
		 * id
		 */
	public void setId(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.id = value;
	}
	
	
	
	/**
	 * id
	 */
	@Id
     @WhereSQL(sql="id=:Htmlcaseexec_id")
	public java.lang.String getId() {
		return this.id;
	}
		/**
		 * 入口用例Id
		 */
	public void setBusinessId(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.businessId = value;
	}
	
	
	
	/**
	 * 入口用例Id
	 */
     @WhereSQL(sql="businessId=:Htmlcaseexec_businessId")
	public java.lang.String getBusinessId() {
		return this.businessId;
	}
		/**
		 * 入口用例名称
		 */
	public void setBusinessName(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.businessName = value;
	}
	
	
	
	/**
	 * 入口用例名称
	 */
     @WhereSQL(sql="businessName=:Htmlcaseexec_businessName")
	public java.lang.String getBusinessName() {
		return this.businessName;
	}
		/**
		 * 用例数
		 */
	public void setCaseCount(java.lang.Integer value) {
		this.caseCount = value;
	}
	
	
	
	/**
	 * 用例数
	 */
     @WhereSQL(sql="caseCount=:Htmlcaseexec_caseCount")
	public java.lang.Integer getCaseCount() {
		return this.caseCount;
	}
		/**
		 * 步骤数
		 */
	public void setOperationCount(java.lang.Integer value) {
		this.operationCount = value;
	}
	
	
	
	/**
	 * 步骤数
	 */
     @WhereSQL(sql="operationCount=:Htmlcaseexec_operationCount")
	public java.lang.Integer getOperationCount() {
		return this.operationCount;
	}
		/**
		 * 失败的测试用例个数
		 */
	public void setFailCount(java.lang.Integer value) {
		this.failCount = value;
	}
	
	
	
	/**
	 * 失败的测试用例个数
	 */
     @WhereSQL(sql="failCount=:Htmlcaseexec_failCount")
	public java.lang.Integer getFailCount() {
		return this.failCount;
	}
		/**
		 * 成功的测试用例个数
		 */
	public void setSuccessCount(java.lang.Integer value) {
		this.successCount = value;
	}
	
	
	
	/**
	 * 成功的测试用例个数
	 */
     @WhereSQL(sql="successCount=:Htmlcaseexec_successCount")
	public java.lang.Integer getSuccessCount() {
		return this.successCount;
	}
		/**
		 * 执行人
		 */
	public void setUserId(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.userId = value;
	}
	
	
	
	/**
	 * 执行人
	 */
     @WhereSQL(sql="userId=:Htmlcaseexec_userId")
	public java.lang.String getUserId() {
		return this.userId;
	}
		/*
	public String getstartDateString() {
		return DateUtils.convertDate2String(FORMAT_STARTDATE, getstartDate());
	}
	public void setstartDateString(String value) throws ParseException{
		setstartDate(DateUtils.convertString2Date(FORMAT_STARTDATE,value));
	}*/
	
		/**
		 * 开始时间
		 */
	public void setStartDate(java.util.Date value) {
		this.startDate = value;
	}
	
	
	
	/**
	 * 开始时间
	 */
     @WhereSQL(sql="startDate=:Htmlcaseexec_startDate")
	public java.util.Date getStartDate() {
		return this.startDate;
	}
		/*
	public String getendDateString() {
		return DateUtils.convertDate2String(FORMAT_ENDDATE, getendDate());
	}
	public void setendDateString(String value) throws ParseException{
		setendDate(DateUtils.convertString2Date(FORMAT_ENDDATE,value));
	}*/
	
		/**
		 * 结束时间
		 */
	public void setEndDate(java.util.Date value) {
		this.endDate = value;
	}
	
	
	
	/**
	 * 结束时间
	 */
     @WhereSQL(sql="endDate=:Htmlcaseexec_endDate")
	public java.util.Date getEndDate() {
		return this.endDate;
	}
		/**
		 * bak1
		 */
	public void setBak1(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.bak1 = value;
	}
	
	
	
	/**
	 * bak1
	 */
     @WhereSQL(sql="bak1=:Htmlcaseexec_bak1")
	public java.lang.String getBak1() {
		return this.bak1;
	}
		/**
		 * bak2
		 */
	public void setBak2(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.bak2 = value;
	}
	
	
	
	/**
	 * bak2
	 */
     @WhereSQL(sql="bak2=:Htmlcaseexec_bak2")
	public java.lang.String getBak2() {
		return this.bak2;
	}
		/**
		 * bak3
		 */
	public void setBak3(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.bak3 = value;
	}
	
	
	
	/**
	 * bak3
	 */
     @WhereSQL(sql="bak3=:Htmlcaseexec_bak3")
	public java.lang.String getBak3() {
		return this.bak3;
	}
		/**
		 * bak4
		 */
	public void setBak4(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.bak4 = value;
	}
	
	
	
	/**
	 * bak4
	 */
     @WhereSQL(sql="bak4=:Htmlcaseexec_bak4")
	public java.lang.String getBak4() {
		return this.bak4;
	}
		/**
		 * bak5
		 */
	public void setBak5(java.lang.String value) {
		    if(StringUtils.isNotBlank(value)){
			 value=value.trim();
			}
		this.bak5 = value;
	}
	
	
	
	/**
	 * bak5
	 */
     @WhereSQL(sql="bak5=:Htmlcaseexec_bak5")
	public java.lang.String getBak5() {
		return this.bak5;
	}
	@Override
	public String toString() {
		return new StringBuilder()
			.append("id[").append(getId()).append("],")
			.append("入口用例Id[").append(getBusinessId()).append("],")
			.append("入口用例名称[").append(getBusinessName()).append("],")
			.append("用例数[").append(getCaseCount()).append("],")
			.append("步骤数[").append(getOperationCount()).append("],")
			.append("失败的测试用例个数[").append(getFailCount()).append("],")
			.append("成功的测试用例个数[").append(getSuccessCount()).append("],")
			.append("执行人[").append(getUserId()).append("],")
			.append("开始时间[").append(getStartDate()).append("],")
			.append("结束时间[").append(getEndDate()).append("],")
			.append("bak1[").append(getBak1()).append("],")
			.append("bak2[").append(getBak2()).append("],")
			.append("bak3[").append(getBak3()).append("],")
			.append("bak4[").append(getBak4()).append("],")
			.append("bak5[").append(getBak5()).append("],")
			.toString();
	}
	@Override
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Htmlcaseexec == false){
			return false;
		}
			
		if(this == obj){
			return true;
		}
		
		Htmlcaseexec other = (Htmlcaseexec)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}

	@Transient
    public List<Htmlparameter> getParameters() {
        return parameters;
    }

    public void setParameters(List<Htmlparameter> parameters) {
        this.parameters = parameters;
    }
}

	
